<template>
	<view class="index" style="padding-top: 20rpx;">
		<view class="index-item index-item-2" style="padding-top: 0; margin-top: 0;">
			<view class="index-item-2-list">
				<view class="index-item-2-item" v-for="(data,index) in growList" :key="index">
					<navigator :url="'/pages/growing/growing-info?type='+ data.sort">
						<view class="index-item-2-item-image"><image :src="data.logo"></image></view>
						<view class="index-item-2-item-info">
							<view>{{data.name}}</view>
							<text>{{data.brief}}</text>
						</view>
						<view class="index-item-2-item-arrow">
							<text :class="['tag',{gary: data.is_succeed!=0}]">{{data.is_succeed==0?'未完成':'已完成'}}</text>
							<image src="https://master.shengejiaju.cn/web/static/icons/ico_more_home@2x.png"></image>
						</view>
					</navigator>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				growList: []
			};
		},
		onLoad() {
			
		},
		onShow() {
			this.getGrowLists()
		},
		methods: {
			// 获取商家成长
			getGrowLists(){
				this.$api.GrowLists({store_id: JSON.parse(uni.getStorageSync('userInfo')).store_id,limit: 20}).then(res => {
					this.growList = res.datas
				})
			}
		}
	}
</script>

<style lang="scss">
	@import '../../static/scss/index.scss'
</style>
